package com.example.pkmedical.Activity.help;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextClock;
import android.widget.TextView;

import com.example.pkmedical.Base.BaseActivity;
import com.example.pkmedical.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;


public class HelpActivity extends BaseActivity {

    @BindView(R.id.main_house)
    ImageView mainHouse;
    @BindView(R.id.main_house_text)
    TextView mainHouseText;
    @BindView(R.id.main_date)
    TextClock mainDate;
    @BindView(R.id.help_sp)
    Button helpSp;
    @BindView(R.id.help_cfzl)
    Button helpCfzl;
    @BindView(R.id.help_qjzd)
    Button helpQjzd;
    @BindView(R.id.help_history)
    TextView helpHistory;
    @BindView(R.id.help_icon)
    Button helpIcon;
    @BindView(R.id.help_finish)
    Button helpFinish;
    @BindView(R.id.help_zero)
    Button helpZero;
    @BindView(R.id.help_position)
    Button helpPosition;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.fragment_help);
        ButterKnife.bind(this);
    }

    @Override
    public void initData() {

    }

    @Override
    public void initView() {
        mainHouse.setImageResource(R.drawable.img_title_help);
        mainHouseText.setText(R.string.title_help);
    }

    @Override
    public void initPresenter() {

    }

    @Override
    public void showDialog(String... msg) {

    }

    @OnClick({R.id.help_sp, R.id.help_cfzl, R.id.help_qjzd, R.id.help_history, R.id.help_icon, R.id.help_finish, R.id.help_zero,R.id.help_position})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.help_sp:
                setIntentData(0);
//                overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
                break;
            case R.id.help_cfzl:
                setIntentData(1);
//                overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
                break;
            case R.id.help_qjzd:
                setIntentData(2);
//                overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
                break;
            case R.id.help_history:
//                setIntentData(3);
//                overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
                break;
            case R.id.help_icon:
                Intent intent_icon = new Intent(HelpActivity.this, HelpIconActivity.class);
                startActivity(intent_icon);
//                overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
                break;
            case R.id.help_finish:
                finish();
                break;
            case R.id.help_zero:
                setIntentData(4);
                break;
            case R.id.help_position:
                setIntentData(5);
                break;
        }
    }

    private void setIntentData(int num) {
        Intent intent_zero = new Intent(HelpActivity.this, HelpLastActivity.class);
        intent_zero.putExtra("type", num);
        startActivity(intent_zero);
    }
}
